<html>
<head>
<title>Mua bán cho nhận</title>
<link href="<s:url value='/styles/memberUpdateInfo.css'/>" rel="stylesheet"
	media="screen" />
<script type="text/javascript" src="<s:url value='/js/jquery.form.js'/>"></script>
<script type="text/javascript" src="<s:url value='/js/memberUpdateInfo.js'/>"></script>
<script>
jQuery(document).ready(function() {
    $("#birthDay").datepicker({
      changeMonth: true,
      changeYear: true,
      yearRange: "-100:+0"
    });
  });
  </script>
</head>
<body>
	<div class="container">
		<div id="mbcn">
			<h1>Thông tin cá nhân </h1>
			<form action="memberInfo" class="mbcn" method="post">
			<div class="row_item">
					<label class="item_label">Email</label>
					<label class="item_label_email">${model.email}</label>
					<s:hidden name="email" id="email"  value="%{model.email}"></s:hidden>
			</div>
			<div class="row_item">
					<p>
						 <a href="#" onclick="javascript:JS_COMMON.showPopup('changepassword',400,300,'no',false);"
							class="ng-binding">Đổi mật khẩu</a>
					</p>

				</div>
			<div class="row_item">
					<label class="item_label">Họ và tên</label>
					<s:textfield name="memberNm" id="memberNm" value="%{model.memberNm}"></s:textfield>
				</div>
				<div class="row_item">
					<label class="item_label">Ngày sinh</label>
					<s:textfield name="birthDay" id="birthDay" value="%{model.birthDay}"></s:textfield>
				</div>
				<div class="row_item">
					<label class="item_label">Giới tính</label>
					<s:select list="#{'1':'---','2':'Nam', '3':'Nữ'}"
						value="%{model.gender}" name="gender" id="gender" />
				</div>
			<label class="item_label">Ảnh đại diện</label>
			<s:if test="%{model.memberAvt == null}">
				<div id="image"
					style="width: 280px; height: 280px; background-image: url('images/mainImg.jpg');">
				</div>
				</s:if><s:else>
				<div id="image">
				<img src="imagesUserUploaded/${model.memberAvt}" width="280px" />
				<input type="hidden" name="memberAvt" id="memberAvt" value="${model.memberAvt}" />
										</div>
				</s:else>
				<div class="row_item">
					<p>
						 <a href="#" onclick="javascript:uploadImage();"
							class="ng-binding">chọn file từ máy </a>
					</p>

				</div>
				
				<div>
					<label id="chkPostFb"><s:checkbox name="receiveEmail" id="receiveEmail" value="%{model.receiveEmail == 1?true:false}"
							fieldValue="true" />Nhận email thông báo khi được tương tác trên MBCN</label>

				</div>
				<div class="btnSubmit">
					<button type="button" onclick="javascript:updateInfo();" class="btnMbcn">Lưu thay đổi</button>
				</div>
			</form>
		</div>
	</div>
	<s:actionerror />
	<s:form action="uploadImage" id="formUpload" method="post"
		enctype="multipart/form-data" style="display : none;">
		<s:hidden name="fileType" value="avt" />
		<s:file name="userImage" label="User Image" id="openDialog" />
	</s:form>

</body>
</html>